<?php


namespace App\Tool;


class Request
{

    /**
     * 获取模块名称
     * Create by PeterYang
     * 2020/06/01 19:55:33
     * Email:904801074@qq.com
     * @return mixed|string
     */
    static function getMode()
    {


        try {
            $uri = request()->route()->uri;

            $mode = explode('/', $uri)[0];

            if (!$mode) return '';


            return $mode;

        } catch (\Exception $exception) {


            return '';
        }


    }

}
